//
//  ViewController.m
//  TransValue
//
//  Created by Justsoso on 16/2/25.
//  Copyright © 2016年 NIIT. All rights reserved.
//

#import "ViewController.h"
#import "ViewControllerB.h"

@interface ViewController ()<ViewControllerBDelegate>

@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view, typically from a nib.
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender
{
    ViewControllerB *vcB = segue.destinationViewController;
    vcB.delegate = self;
}

- (void)transUserName:(NSString *)u andPassword:(NSString *)p andEmail:(NSString *)e
{
    self.registerResultLabel.text = [NSString stringWithFormat:@"注册成功\n用户名:%@\n密码:%@\n邮箱:%@",u,p,e];
}
- (void)touchesBegan:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event
{
    [self.view endEditing:YES];
}
@end
